
//TODO a(62)
function a62(module, exports, a) {
    var i = a(23), s = a(3), r = a(21), n = function (e) {
        this.contDom = e.dom.cont, this.parentEl = e.dom.parentEl, this.active = e.active
    };
    s.extend(n, i);
    var o = {
        init: function () {
            this.playerData = this.manager.playerData, this.nodes = {
                pannel: this.parentEl.find(".js-pannel"),
                poster: this.parentEl.find(".hv_play_poster"),
                loading: this.parentEl.find(".hv_ico_loading"),
                bigPlayBtn: this.parentEl.find(".hv_ico_pasued"),
                shadow: this.parentEl.find(".js-bg")
            }, this.showLoadingTime = null, this.addEvent()
        }, addEvent: function () {
            this.manager.listener.on(r.PLAY_STATE, function (e, t) {
                "init" == t && (this.manager.evt.off("vjs_preparPlay", this.onPreparPlay, this), this.manager.evt.off("vjs_startPlay", this.onStartPlay, this), this.manager.evt.one("vjs_preparPlay", this.onPreparPlay, this), this.manager.evt.one("vjs_startPlay", this.onStartPlay, this), this.nodes.loading[0].style.display = "block", this.nodes.bigPlayBtn[0].style.display = "none")
            }, this), this.nodes.bigPlayBtn.on("click", function () {
                this.manager.evt.trigger(r.EVENT.PLAYER_COMMAND, "play")
            }, this), this.nodes.pannel.on("click", function (e) {
                e.target == this.nodes.pannel[0] && "play" == this.manager.listener.get(r.PLAY_STATE) && this.manager.evt.trigger(r.EVENT.PLAYER_COMMAND, "pause")
            }, this), this.manager.evt.on("vjs_play", function () {
                this.nodes.bigPlayBtn[0].style.display = "none"
            }, this), this.manager.evt.on("vjs_pause", function () {
                this.nodes.bigPlayBtn[0].style.display = "block"
            }, this), this.manager.evt.on("vjs_hideLoading", this.hideLoading, this), this.manager.evt.on("vjs_timeupdate vjs_pause vjs_p2pBufferend", this.hideLoading, this), this.manager.evt.on("vjs_seeking vjs_waiting vjs_stalled vjs_p2pBufferstart", this.showLoading, this)
        }, onStartPlay: function () {
            this.nodes.poster[0].style.display = "none", this.nodes.bigPlayBtn[0].style.display = "none", this.nodes.shadow[0].style.display = "none", this.manager.listener.get(r.IS_AD) || (this.nodes.loading[0].style.display = "block")
        }, onPreparPlay: function () {
            this.nodes.loading[0].style.display = "none", this.nodes.bigPlayBtn[0].style.display = "block"
        }, showLoading: function (e) {
            if (!this.playerData.config.supportP2P) {
                var t = this.manager.listener.get(r.PLAY_STATE);
                if ("vjs_stalled" == e.type && ("pause" == t || "init" == t || "ended" == t || "stop" == t))return
            }
            "vjs_seeking" == e.type ? this.nodes.loading[0].style.display = "block" : (clearTimeout(this.showLoadingTime), this.showLoadingTime = setTimeout(s.bind(function () {
                    this.nodes.loading[0].style.display = "block"
                }, this), 500))
        }, hideLoading: function (e) {
            if (!this.playerData.config.supportP2P) {
                var t = this.manager.listener.get(r.PLAY_STATE);
                if ("vjs_timeupdate" == e.type && "seeking" == t)return
            }
            this.showLoadingTime && (clearTimeout(this.showLoadingTime), this.showLoadingTime = null), this.nodes.loading[0].style.display = "none"
        }
    };
    s.merge(n.prototype, o), module.exports = n
}

